<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>时间戳转换工具</title>
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
</head>
<body>
    <div class="container">
        <div class="header">
            <a href="index.html" class="back-button">
                <i class="fas fa-arrow-left"></i>
            </a>
            <h2>时间戳转换工具</h2>
        </div>

        <div class="conversion-section">
            <h3>时间戳转日期时间</h3>
            <div class="input-group">
                <label>输入时间戳（毫秒）:</label>
                <input type="number" id="timestamp" placeholder="请输入13位时间戳">
            </div>
            <button onclick="timestampToDate()">转换</button>
            <div class="result" id="dateResult"></div>
        </div>

        <div class="conversion-section">
            <h3>日期时间转时间戳</h3>
            <div class="input-group">
                <label>选择日期时间:</label>
                <input type="datetime-local" id="datetime">
            </div>
            <button onclick="dateToTimestamp()">转换</button>
            <div class="result" id="timestampResult"></div>
        </div>

        <div class="conversion-section">
            <h3>当前时间</h3>
            <div class="result" id="currentTime"></div>
            <div class="button-group">
                <button onclick="updateCurrentTime()">刷新</button>
                <button onclick="copyCurrentTimestamp()">复制时间戳</button>
            </div>
        </div>

        <div id="toast" class="toast">操作成功</div>
    </div>
    <script src="../js/timeChange.js"></script>
</body>
</html> 